package com.gree.changying.activity.mainactivity.adapter;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by youdelu on 2018/4/27 10:03.
 */
public class FrmPagerAdapter extends FragmentPagerAdapter {
    private List<Fragment> mDatas = new ArrayList<>();

    public FrmPagerAdapter(FragmentManager fm, List<Fragment> datas) {
        super(fm);
        this.mDatas = datas;
    }

    @Override
    public Fragment getItem(int position) {
        return  mDatas.get(position);
    }

    @Override
    public int getCount() {
        return mDatas.size();
    }
}
